'use strict';
/**
 * logic
 * @param  {} []
 * @return {}     []
 */
export default class extends think.logic.base {
  /**
   * index action logic
   * @return {} []
   */
  doregisterAction(){
  	this.allowMethods = 'post'; //只允许 GET 和 POST 请求类型
  	if(this.isPost()) {
	  	let rules = {
	      name: "required",
	      password: "required",
	      email: "required|email",
	    }
	    !this.validate(rules) && this.fail('校验错误', this.errors());
  	}
  }
}